package com.iot.device.mapper;

import com.iot.device.domain.GasClient;
import com.iot.device.dto.GasClientDataStatistics;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 设备Mapper接口
 * 
 * @author iot
 * @date 2023-04-14
 */
@Mapper
public interface StatisticsMapper
{
    Map<String, Long> statisticsTotalGasEvent(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    Map<String, Long> statisticsTotalGasEventGroupByType(Long userId);

    Map<String, Long> statisticsTodayGasEventGroupByType(@Param("userId") Long userId, @Param("todayStart") Date todayStart);

    Map<String, Long> statisticsMonthGasEventGroupByType(@Param("userId") Long userId, @Param("monthStart") Date monthStart);

    List<Map<String, Object>> selectGasEventTrendStatisticsByDuration(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId);

    Map<String, Object> selectGasEventThisYearStatistics(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    List<GasClientDataStatistics> selectGasClientDataStatistics(@Param("userId") Long userId, @Param("hourLimit") int hourLimit, @Param("deptId") Long deptId);




    Map<String, Long> statisticsTotalQuakeEvent(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    Map<String, Object> selectQuakeEventThisYearStatistics(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    List<Map<String, Object>> selectQuakeEventTrendStatisticsByDuration(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId);

    Map<String, Long> statisticsTotalQuakeEventGroupByType(Long userId);

    Map<String, Long> statisticsTodayQuakeEventGroupByType(@Param("userId") Long userId, @Param("todayStart") Date todayStart);

    Map<String, Long> statisticsMonthQuakeEventGroupByType(@Param("userId") Long userId, @Param("monthStart") Date monthStart);




    Map<String, Long> statisticsTotalBeidouEvent(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    Map<String, Object> selectBeidouEventThisYearStatistics(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    List<Map<String, Object>> selectBeidouEventTrendStatisticsByDuration(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId);

    Map<String, Long> statisticsTotalBeidouEventGroupByType(Long userId);

    Map<String, Long> statisticsTodayBeidouEventGroupByType(@Param("userId") Long userId, @Param("todayStart") Date todayStart);

    Map<String, Long> statisticsMonthBeidouEventGroupByType(@Param("userId") Long userId, @Param("monthStart") Date monthStart);



    Map<String, Long> statisticsTotalPressureSensorEvent(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    Map<String, Object> selectPressureSensorEventThisYearStatistics(@Param("userId") Long userId, @Param("todayStart") Date todayStart, @Param("monthStart") Date monthStart);

    List<Map<String, Object>> selectPressureSensorEventTrendStatisticsByDuration(@Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("userId") Long userId);

    Map<String, Long> statisticsTotalPressureSensorEventGroupByType(Long userId);

    Map<String, Long> statisticsTodayPressureSensorEventGroupByType(@Param("userId") Long userId, @Param("todayStart") Date todayStart);

    Map<String, Long> statisticsMonthPressureSensorEventGroupByType(@Param("userId") Long userId, @Param("monthStart") Date monthStart);
}
